package com.zy.Lambda;

import org.junit.Test;

import java.util.function.Supplier;

public class UseSuplier
{
    /*
    Supplier：供给型接口
        无参数，有返回值
        抽象方法：Type get()，适合提供数据;
    * */
    @Test
    public void test1()
    {
        Supplier<String> supplier=()->"Can you understand this statement!!";
        System.out.println(supplier.get());
        //打印结果：Can you understand this statement!!
    }
}
